package com.library.bookmanagement.service;

import com.library.bookmanagement.entity.Admin;
import com.library.bookmanagement.entity.Book;
import com.library.bookmanagement.entity.User;
import com.library.bookmanagement.util.ResultUtil;

import java.util.List;
import java.util.Map;

/**
 * @author ：ZXM
 * @date ：Created in 2020/5/8 16:52
 * @description:图书管理service接口
 */
public interface AdminService {
    List<Admin> QueryAdminAll();

    Boolean deleteById(Integer id);

    Boolean addAdmin(Admin admin);


    ResultUtil addUser(User user);

    ResultUtil deleteUserById(List<Integer> ids);

    ResultUtil<Map<String,Object>> queryCanUse(int pageNum,int pageSize);

    ResultUtil addBook(Book book);

    ResultUtil deleteBookById(List<Integer> ids);

    ResultUtil<Map<String,Object>> queryBookIsLoad(int pageNum, int pageSize);

    ResultUtil<User> queryUserById(Integer userId);

    ResultUtil editUser(User user);

    ResultUtil<Book> queryBookById(Integer bookId);

    ResultUtil editBook(Book book);

    ResultUtil editAdminById(Admin admin);

    ResultUtil editUserPassword(Integer userId, String oldPassword, String newPassword);

    ResultUtil editUserPaswword(User user);

    ResultUtil<Admin> queryAdminByName(String username);

    ResultUtil pullOffBookById(Integer bookId, Integer bool);

    ResultUtil logOffUser(Integer userId, Integer bool);

    void editAdminByName(String username, String filename);
}
